import Vue from 'vue'
import Router from 'vue-router'
import store from '../store/'
Vue.use(Router);

import login from '../views/login.vue'
import favorites from '../views/favorites.vue'

export default new Router({
	mode: 'history',
	scrollBehavior: (to, from, savedPosition) => {
		if (savedPosition) {
			return savedPosition
		} else {
			return {
				x: 0,
				y: 0
			}
		}
	},
	routes: [{
		path: '*',
		name: 'default',
		component: login
	}, {
		path: '/',
		name: 'login',
		component: login
	}, {
		path: '/favorites',
		name: 'favorites',
		component: favorites
	}, {
		path: '/profile',
		name: 'profile',
		component: require('../views/profile.vue').default
	}]
})